<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<%@ include file="/view/common/header.jsp"%> 
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>品牌管理</title>
		<script type="text/javascript">
		
			//查询
			function search(){
				$('#dg').datagrid('load',{
					    brandName:   $("#brandName").val() ,
				});
			}
		</script>
	</head>
<body style="margin:1px;">
	<!-- 工具栏  -->
	<div id="tb">
		<div>
			<a href="javascript:openAddDialog('添加品牌 ' ,'../brand/save.do')" class="easyui-linkbutton" iconCls="icon-add" plain="true">新增</a>
			<a href="javascript:openModifyDialog('编辑品牌 ' ,'../brand/save.do')" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
  			<a href="javascript:deleteById('../brand/delete.do')" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
		</div>
		<div>
							&nbsp;品牌名称：&nbsp;<input type="text" id="brandName" size="20"  class="easyui-validatebox" />&nbsp;
			<input type="text"   size="20"  class="easyui-combobox" />
			<input type="text"   size="20"  class="easyui-textbox" />
						
			<a href="javascript:search()" class="easyui-linkbutton" iconCls="icon-search" plain="true">搜索</a>
		</div>
	</div>
	
	<!-- 查询表单 --> 
	<table id="dg" title="品牌管理" class="easyui-datagrid"  pagination="true" rownumbers="true"  fit="true"  url="../brand/queryForPage.do"  toolbar="#tb">
		 <thead>
				<tr>
							<th data-options="field:'title',width:100" align="center">品牌名称</th>
							<th data-options="field:'shopname',width:100" align="center">商家名</th>
							<th data-options="field:'shopAddress',width:100" align="center">商家地址</th>
							<th data-options="field:'shopUrl',width:100" align="center">商家链接</th>
							<th data-options="field:'shoptel',width:100" align="center">商家电话</th>
					
				</tr>
		</thead>
	</table>
	
	
	<!-- 弹出对话框 -->
	<div id="dlg" class="easyui-dialog" style="width: 700px;height:320px;padding: 10px 20px" closed="true" buttons="#dlg-buttons">
		<form id="fm" method="post" novalidate>
		
							<input id="brandId" name="brandId" type="hidden" checkbox="true"/>
						 <div class="fitem">
			                <label>品牌名称:</label>
			                <input name="title" class="easyui-textbox easyui-validatebox"   data-options="required:true">   
	           			 </div>

						<div class="fitem">
							<label>商家名:</label>
							<input name="shopname" class="easyui-textbox easyui-validatebox"   data-options="required:true">
						</div>

						<div class="fitem">
							<label>商家地址:</label>
							<input name="shopAddress" class="easyui-textbox easyui-validatebox"   data-options="required:true">
						</div>

						<div class="fitem">
							<label>商家链接:</label>
							<input name="shopUrl" class="easyui-textbox easyui-validatebox"   >
						</div>

						<div class="fitem">
							<label>商家电话:</label>
							<input name="shoptel" class="easyui-textbox easyui-validatebox"   data-options="required:true">
						</div>
      </form>
	</div> 
	
	

	<!-- 保存和关闭按钮 -->
	<div id="dlg-buttons">
		<a href="javascript:save()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
		<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
	</div>
	
</body>
</html>